package com.iss.supermarket.util.repository;

import com.iss.supermarket.util.entity.Goods;
import com.iss.supermarket.util.entity.SpUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;


import java.util.ArrayList;
import java.util.List;

@Repository("UserDao")
public interface UserDao {
    ArrayList<SpUser> queryUserList();
    SpUser queryUserInfoByName(@Param("Name") String Name);
    SpUser queryUserInfoByUUID(@Param("UUID")String UUID);
    SpUser queryUserInfoByEmail(@Param("Email")String Email);
    SpUser queryUserInfoByMobile(@Param("Mobile")String Mobiole);
//    SpUser queryUserInfoByMsg(@Param("msg")String msg);
//    ArrayList<SpUser> queryUserInfoByRemark(@Param("remark")String Remark);
    void AddNewSpUser(@Param("uuid")String uuid,
                      @Param("username")String username,
                      @Param("password")String password,
                      @Param("email")String email,
                      @Param("mobile")String mobile,
                      @Param("name")String name,
                      @Param("remark")String remark,
                      @Param("modtime")String modtime,
                      @Param("delflag")int delflag);
    void updateUserInfo(@Param("username")String username,
                        @Param("password")String password,
                        @Param("mobile")String mobile,
                        @Param("email")String email,
                        @Param("name")String name,
                        @Param("uuid")String uuid,
                        @Param("remark")String remark,
                        @Param("modtime")String modtime,
                        @Param("delflag")int delflag);
    List<SpUser> queryUserListByRole(@Param("role")String role);
}
